<?php
/**
 * Created by PhpStorm.
 * User: zhangrongxiang
 * Date: 2017/5/31
 * Time: 上午10:32
 */

$ref = 0;
$row =& $ref;
foreach (array(1, 2, 3) as $row) {
    // do something
    $row += 1;
}

echo $ref; // 3 - last element of the iterated array
echo PHP_EOL;
$arr = [
    11,
    22,
    33,
    44,
    55
];
$value = 0;
foreach ($arr as $value) {
    $value += 1;
}

print $value;

print_r(current($arr));